package com.wwmz.chain.pattern.auth.buildchain;

import com.wwmz.chain.pattern.auth.Member;
/**
 * Created by wumz on 2020/9/22 15:35
 */
public class MemberService {
    public void login(String loginName,String loginPass){

        Handler.Builder builder = new Handler.Builder();

        builder.addHandler(new ValidateHandler())
                .addHandler(new LoginHandler())
                .addHandler(new AuthHandler());

        builder.build().doHandler(new Member(loginName,loginPass));
    }
}
